<template>
  <div class="add_channels_wrap">
    <!--  @click="pop_show = true"-->
    <el-button type="text" size="small" @click="showPlay">视频播放</el-button>
    <el-dialog
      v-if="pop_show"
      :title="this.$props.title"
      :visible.sync="pop_show"
      :close-on-click-modal="false"
      append-to-body
    >
      <vab-player-mp4 :config="config" @player="Player = $event" />
    </el-dialog>
  </div>
</template>

<script>
  import { VabPlayerMp4 } from '@/plugins/vabPlayer.js'
  import { customcut } from '@/api/videos'
  export default {
    name: 'DetailPlay',
    components: {
      VabPlayerMp4,
    },
    props: {
      url: {
        type: String,
        default: '',
      },
      title: {
        type: String,
        default: '视频播放',
      },
    },
    data() {
      return {
        pop_show: false,
        Player: null,
        config: {
          id: 'mse2',
          url: this.$props.url,
          volume: 1,
          autoplay: false,
        },
      }
    },
    mounted() {},
    methods: {
      showPlay() {
        this.pop_show = true
      },
      myclose() {
        this.pop_show = false
      },
    },
  }
</script>
